package com.zhuangxiaoyan.springboot.mybatis.dao;

import com.zhuangxiaoyan.springboot.mybatis.domain.OrderItem;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

/**
 * OrderItemMapper
 *
 * @author xjl
 * @version 2025/01/11 21:26
 **/
@Mapper
public interface OrderItemMapper {

    /**
     * 添加订单项
     *
     * @param orderItem
     * @return
     */
    int insertOrderItem(OrderItem orderItem);

    /**
     * 修改订单项
     *
     * @param orderItem
     * @return
     */
    int updateOrderItem(OrderItem orderItem);

    /**
     * 删除订单项
     *
     * @param id
     * @return
     */
    int deleteOrderItem(long id);

    /**
     * 根据id查询订单项
     *
     * @param id
     * @return
     */
    OrderItem getOrderItemById(long id);

    /**
     * 查询所有订单项
     *
     * @return
     */
    List<OrderItem> getAllOrderItems();
}